var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var ResKeeper = require("AA_ResKeeper");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;
_decorator.inspector;
var _def_AIControl = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.shuBiaoDian = null;
    t.blockNode = null;
    t.isOpen = false;
    t.aiCDTime = .5;
    t.clickCDTime = 1;
    t.shuBiaoDelayTime = .5;
    t.dragTime = 1;
    t.startDelayTime = 2;
    t.fightDelayTime = 1;
    t.isAiTime = false;
    return t;
  }
  var _ref__creator;
  __extends(_creator, e);
  _ref__creator = _creator;
  _creator.prototype.onLoad = function () {
    _ref__creator._instance = this;
    this.node.zIndex = 9999;
    this.blockNode.active = false;
  };
  _creator.prototype.ShowClickBtn = function (e, t) {
    var o = this;
    if (this.isOpen && !this.isAiTime) {
      this.isAiTime = true;
      this.scheduleOnce(function () {
        o.shuBiaoDian.active = true;
        o.shuBiaoDian.stopAllActions();
        o.shuBiaoDian.setPosition(o.shuBiaoDian.parent.convertToNodeSpaceAR(e.convertToWorldSpaceAR(cc.v2(0, 0))));
        o.shuBiaoDian.runAction(cc.sequence(cc.delayTime(o.shuBiaoDelayTime), cc.callFunc(function () {
          o.shuBiaoDian.active = false;
          o.isAiTime = false;
          t && t();
        })));
      }, this.clickCDTime);
    }
  };
  __decorate([_property(cc.Node)], _creator.prototype, "shuBiaoDian", undefined);
  __decorate([_property(cc.Node)], _creator.prototype, "blockNode", undefined);
  return _ref__creator = __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_AIControl;